package com.stu.day11.clone2;

/**
 * Address类本身也实现了Cloneable接口，并重写了clone()方法来进行浅克隆。
 * @author zy
 * @date 2025/2/12 12:27
 */
class Address implements Cloneable {
    String city;

    public Address(String city) {
        this.city = city;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone(); // Address类的浅克隆
    }
}
